// import store from './store'

const microApps = [
  {
    name: 'sub-vue',
    // entry: process.env.VUE_APP_SUB_VUE,
    entry: 'http://localhost:3001',
    activeRule: '/sub-vue'
  },
  {
    name: 'sub-react',
    // entry: process.env.VUE_APP_SUB_REACT,
    entry: 'http://localhost:3002',
    activeRule: '/sub-react'
  },
  // {
  //   name: 'sub-html',
  //   // entry: process.env.VUE_APP_SUB_HTML,
  //   entry: '/sub-html',
  //   activeRule: '/sub-html'
  // }
]

const apps = microApps.map(item => {
  return {
    ...item,
    container: '#subapp-viewport', // 子应用挂载的div
    props: {
      routerBase: item.activeRule, // 下发基础路由
      // getGlobalState: store.getGlobalState // 下发getGlobalState方法
    }
  }
})

export default apps
